﻿using Sunboxsoft.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using Entity = Sunboxsoft.ASMS.Server.Domain.Entity;
using Service = Sunboxsoft.ASMS.Server.Domain.Service;

namespace Sunboxsoft.ASMS.Web.ApiControllers
{
    public class ApproveController : ApiController
    {
        public ServiceResult Station(GuidIdParams @params)
        {
            return new Service.AuditingService().ApproveStation(@params.Id);
        }
    
        public ServiceResult StationMany(GuidIdArrayParams @params)
        {
            return new Service.AuditingService().ApproveStationMany(@params.IdArray);
        }

        public ServiceResult Supplier(GuidIdParams @params)
        {
            return new Service.AuditingService().ApproveSupplier(@params.Id);
        }

        public ServiceResult SupplierMany(GuidIdArrayParams @params)
        {
            return new Service.AuditingService().ApproveSupplierMany(@params.IdArray);
        }

        public ServiceResult ServiceItem(GuidIdParams @params)
        {
            return new Service.AuditingService().ApproveServiceItem(@params.Id);
        }

        public ServiceResult ServiceItemMany(GuidIdArrayParams @params)
        {
            return new Service.AuditingService().ApproveServiceItemMany(@params.IdArray);
        }
        public ServiceResult Material(GuidIdParams @params)
        {
            return new Service.AuditingService().ApproveMaterial(@params.Id);
        }

        public ServiceResult MaterialMany(GuidIdArrayParams @params)
        {
            return new Service.AuditingService().ApproveMaterialMany(@params.IdArray);
        }
    }
}
